package com.wjy.icu.common.enums;

public enum SystemSMSEnum {


    REGISTER(1,"注册"),
    CHECK(2,"身份验证"),
    LOGIN(3,"登录确认"),
    ResetPassword(4,"修改密码"),
    UpdateUser(5,"信息变更"),
    RemoteLogin(6,"登录异常"),
    OrderReminder(7,"订单提醒"),
    UserOrderReminder(8,"订单用户提醒"),
    DoctorApplySuccessReminder(9,"医生申请通过提醒"),
    DoctorApplyFailReminder(10,"医生申请未通过提醒");



    private int code;
    private String msg;

    public String getMsg() {
        return msg;
    }

    public int getCode() {
        return code;
    }

    SystemSMSEnum(int code, String value ) {
        this.msg = value;
        this.code = code;
    }
    // 此方法是关键
    public static SystemSMSEnum getByCode(Integer code) {
        for (SystemSMSEnum rebateItemTypeEnum : values()) {
            if (rebateItemTypeEnum.getCode()==code) {
                return rebateItemTypeEnum;
            }
        }
        return null;
    }
    // 此方法是关键
    public static SystemSMSEnum getByValue(String value) {
        for (SystemSMSEnum rebateItemTypeEnum : values()) {
            if (rebateItemTypeEnum.getMsg().equals(value)) {
                return rebateItemTypeEnum;
            }
        }
        return null;
    }
}
